import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '接待量',
    align:"center",
    sorter: true,
    dataIndex: 'touristsReceived'
   },
   {
    title: '响应平均时间',
    align:"center",
    sorter: true,
    dataIndex: 'correspondingMeanTime'
   },
   {
    title: '成交总金额',
    align:"center",
    sorter: true,
    dataIndex: 'totalMoney'
   },
   {
    title: '好评率',
    align:"center",
    sorter: true,
    dataIndex: 'customerPraiseRate'
   },
   {
    title: '用户',
    align:"center",
    dataIndex: 'userId_dictText'
   },
   {
    title: '租户',
    align:"center",
    dataIndex: 'tenantId'
   },
   {
    title: '成交总单数',
    align:"center",
    dataIndex: 'totalOrderNum'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
	{
      label: "用户",
      field: "userId",
      component: 'JSearchSelect',
      componentProps:{
         dict:"couple_user,user_name,id"
      },
      //colProps: {span: 6},
 	},
];

//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '接待量',
    field: 'touristsReceived',
    component: 'InputNumber',
  },
  {
    label: '响应平均时间',
    field: 'correspondingMeanTime',
    component: 'InputNumber',
  },
  {
    label: '成交总金额',
    field: 'totalMoney',
    component: 'InputNumber',
  },
  {
    label: '好评率',
    field: 'customerPraiseRate',
    component: 'InputNumber',
  },
  {
    label: '用户',
    field: 'userId',
    component: 'JSearchSelect',
    componentProps:{
       dict:"couple_user,user_name,id"
    },
  },
  {
    label: '租户',
    field: 'tenantId',
    component: 'Input',
  },
  {
    label: '成交总单数',
    field: 'totalOrderNum',
    component: 'InputNumber',
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];

//子表列表数据
export const coupleStatisticsServiceDayColumns: BasicColumn[] = [
   {
    title: '接待量',
    align:"center",
    sorter: true,
    dataIndex: 'touristsReceived'
   },
   {
    title: '响应平均时间',
    align:"center",
    sorter: true,
    dataIndex: 'correspondingMeanTime'
   },
   {
    title: '成交总金额',
    align:"center",
    sorter: true,
    dataIndex: 'totalMoney'
   },
   {
    title: '好评率',
    align:"center",
    sorter: true,
    dataIndex: 'customerPraiseRate'
   },
   {
    title: '用户',
    align:"center",
    dataIndex: 'userId_dictText'
   },
   {
    title: '日期',
    align:"center",
    dataIndex: 'day'
   },
   {
    title: '总单数',
    align:"center",
    sorter: true,
    dataIndex: 'totalOrderNum'
   },
];
//子表表单数据
export const coupleStatisticsServiceDayFormSchema: FormSchema[] = [
  // TODO 子表隐藏字段，目前写死为ID
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false
  },
];
